<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title>目录清单详情</title>
		<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no,viewport-fit=cover">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black">
		<link rel="stylesheet" href="../../css/mui.min.css">
		<link rel="stylesheet" href="../../css/app.css">
		<style>
			.mui-bar-nav~.mui-content{padding:0;margin-top:.9rem;background:#fff;min-height:15rem;}
			.yw_list{width:7rem;overflow:hidden;margin:0 auto;padding:.4rem 0 .6rem 0;}
			.basic_info{width:100%;overflow:hidden;line-height:.42rem;font-size:.284rem;max-height:1.3rem;margin-bottom:.2rem;}
			.yw_list>h4{width:100%;float:left;height:.32rem;line-height:.32rem;color:#999;font-size:.3rem;font-weight:normal;}
			.yw_list>h4>img{width:.32rem;height:.32rem;float:left;margin-right:.1rem;}
			.type_table{width:7rem;float:left;border-radius:.08rem;background:#f5f5f5;margin:.2rem 0 0 0;padding:.35rem 0 0 0;box-sizing:border-box;position:relative;}
			.type_table>ul{padding:0;margin:0;}
			.type_table>ul>li{width:50%;float:left;box-sizing:border-box;padding-left:.55rem;margin-bottom:.3rem;}
			.type_table>ul>li>label{width:100%;float:left;font-size:.26rem;line-height:.4rem;}
			.type_table>ul>li>span{color:#6e81b8;font-size:.24rem;width:100%;float:left;line-height:.3rem;}
			.yw_list>.line{position:relative;}
			.yw_list>.line:after{content:"";width:100%;height:1px;position:absolute;bottom:-.2rem;background-color:#e2e2e2;left:0;}
			.mui-icon-arrowdown{float:right;color:#999999;margin-top:-.05rem;}
			.banshi_active .mui-icon-arrowdown{color:#4072fd;margin-top:-.02rem;margin-top:-.07rem;}
			.banshi_active .mui-icon-arrowdown:before{content:'\e580';}
			.type_table01{margin-top:.35rem;padding:.3rem 0 .3rem  0;display:none;}
			.type_table01>p{padding:0 .25rem;box-sizing:border-box;margin:0;}
			/*审批服务业务*/
			.approval_cont{width:7rem;overflow:hidden;margin:.43rem 0;border-radius:.1rem;float:left;}
			.approval_cont>h5{width:100%;height:.75rem;line-height:.75rem;color:#fff;background:#79b4ff url(../../images/work/sp_ywu.png) no-repeat;background-position:5.5rem center;
			background-size:1.5rem auto;box-sizing:border-box;border-radius:.08rem .08rem 0 0;margin:0;}
			.approval_cont>h5>img{float:left;width:.3rem;margin:.2rem .1rem 0 .3rem;}
			.title_bottom{padding:.15rem .55rem;box-sizing:border-box;border:1px solid #e2e2e2;border-top:none;border-radius:0 0 .08rem .08rem;}
			.title_bottom>a{width:100%;color:#333;font-size:.28rem;display:block;padding:.1rem 0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
			.title_bottom>a>i{display:block;width:.15rem;height:.15rem;background:url(../../images/work/fab.png) no-repeat;background-size:100% auto;float:left;margin:.15rem .1rem 0 0;}
			
		</style>
	</head>

	<body>
		<div class="mui-content">
			<div class="yw_list" id="directoryContents">
				<div class="basic_info">{{directoryInfo.directoryName}}</div>
				<h4><img src="../../images/work/shenpi.png">审批服务业务</h4>
				<div class="type_table">
			 		<ul>
			 			<li>
			 				<label>基本编码</label>
			 				<span>{{directoryInfo.basicCode}}</span>
			 			</li>
			 			<li>
			 				<label>事项类型</label>
			 				<span>{{directoryInfo.serviceTypeName}}</span>
			 			</li>
			 			<li>
			 				<label>实施单位</label>
			 				<span>{{directoryInfo.ssdwName}}</span>
			 			</li>
			 			<li>
			 				<label>行政层级</label>
			 				<span>{{directoryInfo.levelName}}</span>
			 			</li>
			 		</ul>
				</div>
			    <!--设立依据-->
			    <h4 class="line"><img src="../../images/work/shenpi01.png">设立依据<a class="mui-icon mui-icon-arrowdown"></a></h4>
		    	<div class="type_table type_table01">
		 		 <p>{{directoryInfo.setAccord}}</p>
			   </div>
			   <!--审批服务业务-->
			   <div class="approval_cont">
			   	  <h5><img src="../../images/work/sp_cion.png">审批服务业务</h5>
			   	  <div class="title_bottom">
			   	  	<a v-for="service in serviceList" :serviceOid="service.serviceOid" ><i></i>{{service.serviceName}}</a>
			   	  </div>
			   </div>
			   
			</div>
		</div>
		<script>
			function my_immersed(immersed){
			}
		</script>
		<script src="../../js/immersed.js"></script>
		<script src="../../js/mui.min.js"></script>
		<script src="../../js/jquery2.2.4.min.js"></script>
		<script src="../../js/common.js"></script>
		<script src="../../js/vue.min.js"></script>
		<script src="../../js/app.js"></script>
		<script>
            mui.plusReady(function() {
				var districtId = localStorage.getItem("districtId");
				var directoryOid = localStorage.getItem("directoryOid");
				var userType = localStorage.getItem("userType");
				loadData(districtId,directoryOid,userType);
			});
			
			var directoryContents = new Vue({
				el: '#directoryContents',
				data: {
					directoryInfo: {}, //基本数据
					serviceList: [] //审批服务业务
				}
			});
			
            
            /**
             * 调用后台数据
             * @param {Object} districtId 区划
             * @param {Object} directoryOid 小项主键
             * @param {Object} userType 服务对象（0-个人 1-表示法人）
             */
            function loadData(districtId,directoryOid,userType) {
			    var param = 'districtId='+districtId+'&directoryOid=' + directoryOid+ '&random=' + Math.random()+'&userType=' + userType;
				var url = 'appHttpService/viewChildDir.do';
			    utils.ajax(url, function(data) {
					data = JSON.parse(data);
					if(data.code == 0) {
						var directory = JSON.parse(data.directory);
						var serviceList = JSON.parse(data.serviceList);
						var ssdwName = '';
						if(directory[0].sysDict != undefined && directory[0].sysDict != null ){
							ssdwName = directory[0].sysDict.name;
						}
						directoryContents.directoryInfo = {
							directoryName: directory[0].directoryName,
							basicCode: directory[0].basicCode,
							serviceTypeName: directory[0].serviceType.serviceTypeName,
							ssdwName: ssdwName,
							levelName:directory[0].levelName,
							setAccord:directory[0].setAccord
						};
						
						if(serviceList != null && serviceList.length>0){
						  directoryContents.serviceList = serviceList;
						}
						
					}
					closeWaitingAndShowView();
				}, param);
				
			};
			
			/**
			 * 设立依据展开设置方法
			 */
			mui(".yw_list").on('tap','h4.line',function(){
	            if($(this).hasClass('banshi_active')){
	            	$(this).removeClass('banshi_active');
	            	$(this).siblings('.type_table01').slideUp();
	            }else{
            	  $(this).addClass('banshi_active');
            	  $(this).siblings('.type_table01').slideDown();
	            }
            })
			
			
			/**
             * 查看详情页面
             */
			mui("body").on('tap','.title_bottom a',function(){
				utils.showWaiting();
	            var hsw = openNewWin('../work/bszn_info.html?serviceOid=' + this.getAttribute("serviceOid"),{bounce:'none'}, 'bszn_info');
	            mui.fire(hsw,'getDetail',{serviceOid:this.getAttribute("serviceOid")});
            })
		</script>
	</body>

</html>
